<?php

/**
 * 表关系
 */
Route::get('model_manage/table_relations', ['as'=> 'model_manage.table_relations.index', 'uses' => 'ModelManage\TableRelationController@index']);
Route::post('model_manage/table_relations', ['as'=> 'model_manage.table_relations.store', 'uses' => 'ModelManage\TableRelationController@store']);
Route::get('model_manage/table_relations/create', ['as'=> 'model_manage.table_relations.create', 'uses' => 'ModelManage\TableRelationController@create']);
Route::put('model_manage/table_relations/{table_relations}', ['as'=> 'model_manage.table_relations.update', 'uses' => 'ModelManage\TableRelationController@update']);
Route::patch('model_manage/table_relations/{table_relations}', ['as'=> 'model_manage.table_relations.update', 'uses' => 'ModelManage\TableRelationController@update']);
Route::delete('model_manage/table_relations/{table_relations}', ['as'=> 'model_manage.table_relations.destroy', 'uses' => 'ModelManage\TableRelationController@destroy']);
Route::get('model_manage/table_relations/{table_relations}', ['as'=> 'model_manage.table_relations.show', 'uses' => 'ModelManage\TableRelationController@show']);
Route::get('model_manage/table_relations/{table_relations}/edit', ['as'=> 'model_manage.table_relations.edit', 'uses' => 'ModelManage\TableRelationController@edit']);

// 根据表id获取字段列表
Route::get('model_manage/table_relations/table/table_fields', ['as'=> 'model_manage.table_relations.table_fields', 'uses' => 'ModelManage\TableRelationController@getTableFieldByTableId']);
// ajax回填数据
Route::get('model_manage/table_relations/table/{table}/table_fields', ['as'=> 'model_manage.table_relations.table.table_fields', 'uses' => 'ModelManage\TableRelationController@getTableField']);